﻿Challonge API v1 Documentation
The Challonge API expands tournament creation and control to the programmatic level. You can create tournaments on the fly and report scores directly from your application. This allows you to define score reporting permissions that fit your user model, and provide a more seamless tournament experience for your users.
The API is accessible over a secure connection at https://api.challonge.com/v1/
________________


Authentication
All interactions with the API require a Challonge account with a verified email address and API key. You can generate one from your developer settings page. We support HTTP basic authentication. Username = your Challonge username, Password = your API key. Many clients format these requests as: https://username:api-key@api.challonge.com/v1/... Or, if you prefer, you can just pass your API key as parameter api_key to all method calls.
API methods with GET request types are permitted for any tournament, whether belonging to you or not. All other API methods are scoped to tournaments that you either own or have admin access to.
________________


Response Formats
XML or JSON. The extension in your request indicates your desired response. e.g. https://api.challonge.com/v1/tournaments.xml or https://api.challonge.com/v1/tournaments.json - you may also set your request headers to accept application/json, text/xml or application/xml
________________


Response Codes
The following HTTP response codes are issued by the API. All other codes are the result of a request not reaching the application.
* 200- OK
* 401- Unauthorized (Invalid API key or insufficient permissions)
* 404- Object not found within your account scope
* 406- Requested format is not supported - request JSON or XML only
* 422- Validation error(s) for create or update method
* 500- Something went wrong on our end. If you continually receive this, please contact us.
________________


Validation Errors
Requests that complete but have validation errors or other issues will return an array of error messages and status code 422. e.g.:
* XML
* JSON
{
  "errors": [
    "Name can't be blank",
    "URL can't be blank"
  ]
}
________________


REST API Methods
Please note, two-stage tournaments are not yet supported by our public API. They'll be available in V2 along with 3+ participant per match support.
Tournaments
Index
	GET
	Retrieve a set of tournaments created with your account.
	Create
	POST
	Create a new tournament.
	Show
	GET
	Retrieve a single tournament record created with your account.
	Update
	PUT
	Update a tournament's attributes.
	Destroy
	DELETE
	Deletes a tournament along with all its associated records. There is no undo, so use with care!
	Process Check-ins
	POST
	This should be invoked after a tournament's check-in window closes before the tournament is started.
1. Marks participants who have not checked in as inactive.
2. Moves inactive participants to bottom seeds (ordered by original seed).
3. Transitions the tournament state from 'checking_in' to 'checked_in'
NOTE: Checked in participants on the waiting list will be promoted if slots become available.
	Abort Check-in
	POST
	When your tournament is in a 'checking_in' or 'checked_in' state, there's no way to edit the tournament's start time (start_at) or check-in duration (check_in_duration). You must first abort check-in, then you may edit those attributes.
1. Makes all participants active and clears their checked_in_at times.
2. Transitions the tournament state from 'checking_in' or 'checked_in' to 'pending'
	Start
	POST
	Start a tournament, opening up first round matches for score reporting. The tournament must have at least 2 participants.
	Finalize
	POST
	Finalize a tournament that has had all match scores submitted, rendering its results permanent.
	Reset
	POST
	Reset a tournament, clearing all of its scores and attachments. You can then add/remove/edit participants before starting the tournament again.
	Open for predictions
	POST
	Sets the state of the tournament to start accepting predictions. Your tournament's 'prediction_method' attribute must be set to 1 (exponential scoring) or 2 (linear scoring) to use this option. Note: Once open for predictions, match records will be persisted, so participant additions and removals will no longer be permitted.
	Participants
Index
	GET
	Retrieve a tournament's participant list.
	Create
	POST
	Add a participant to a tournament (up until it is started).
	Bulk Add
	POST
	Bulk add participants to a tournament (up until it is started). If an invalid participant is detected, bulk participant creation will halt and any previously added participants (from this API request) will be rolled back.
	Show
	GET
	Retrieve a single participant record for a tournament.
	Update
	PUT
	Update the attributes of a tournament participant.
	Check in
	POST
	Checks a participant in, setting checked_in_at to the current time.
	Undo Check In
	POST
	Marks a participant as having not checked in, setting checked_in_at to nil.
	Destroy
	DELETE
	If the tournament has not started, delete a participant, automatically filling in the abandoned seed number. If tournament is underway, mark a participant inactive, automatically forfeiting his/her remaining matches.
	Clear
	DELETE
	Deletes all participants in a tournament. (Only allowed if tournament hasn't started yet)
	Randomize
	POST
	Randomize seeds among participants. Only applicable before a tournament has started.
	Matches
Index
	GET
	Retrieve a tournament's match list.
	Show
	GET
	Retrieve a single match record for a tournament.
	Update
	PUT
	Update/submit the score(s) for a match.
	Reopen
	POST
	Reopens a match that was marked completed, automatically resetting matches that follow it
	Mark as underway
	POST
	Sets "underway_at" to the current time and highlights the match in the bracket
	Unmark as underway
	POST
	Clears "underway_at" and unhighlights the match in the bracket
	Match Attachments
Index
	GET
	Retrieve a match's attachments.
	Create
	POST
	Add a file, link, or text attachment to a match. NOTE: The associated tournament's "accept_attachments" attribute must be true for this action to succeed.
	Show
	GET
	Retrieve a single match attachment record.
	Update
	PUT
	Update the attributes of a match attachment.
	Destroy
	DELETE
	Delete a match attachment.
	

Tournaments API Calls
List tournaments (index)
Retrieve a set of tournaments created with your account.
________________


URL
GET https://api.challonge.com/v1/tournaments.{json|xml}
________________
Parameters
Name
	Description
	Required
api_key
	Your API key (required unless you're using HTTP basic authentication)
	state
	all, pending, in_progress, ended
	type
	single_elimination, double_elimination, round_robin, swiss
	created_after
	YYYY-MM-DD
	created_before
	YYYY-MM-DD
	subdomain
	A Challonge subdomain you've published tournaments to. NOTE: Until v2 of our API, the subdomain parameter is required to retrieve a list of your organization-hosted tournaments.
	

Create a tournament
Create a new tournament.
________________


URL
POST https://api.challonge.com/v1/tournaments.{json|xml}
________________
Parameters
Name
	Description
	Required
api_key
	Your API key (required unless you're using HTTP basic authentication)
	tournament[name]
	Your event's name/title (Max: 60 characters)
	tournament[tournament_type]
	Single elimination (default), double elimination, round robin, swiss
	tournament[url]
	challonge.com/url (letters, numbers, and underscores only); when blank on create, a random URL will be generated for you
	tournament[subdomain]
	subdomain.challonge.com/url (Requires write access to the specified subdomain)
	tournament[description]
	Description/instructions to be displayed above the bracket
	tournament[open_signup]
	True or false. Have Challonge host a sign-up page (otherwise, you manually add all participants)
	tournament[hold_third_place_match]
	True or false - Single Elimination only. Include a match between semifinal losers? (default: false)
	tournament[pts_for_match_win]
	Decimal (to the nearest tenth) - Swiss only - default: 1.0
	tournament[pts_for_match_tie]
	Decimal (to the nearest tenth) - Swiss only - default: 0.5
	tournament[pts_for_game_win]
	Decimal (to the nearest tenth) - Swiss only - default: 0.0
	tournament[pts_for_game_tie]
	Decimal (to the nearest tenth) - Swiss only - default: 0.0
	tournament[pts_for_bye]
	Decimal (to the nearest tenth) - Swiss only - default: 1.0
	tournament[swiss_rounds]
	Integer - Swiss only - We recommend limiting the number of rounds to less than two-thirds the number of players. Otherwise, an impossible pairing situation can be reached and your tournament may end before the desired number of rounds are played.
	tournament[ranked_by]
	One of the following: 'match wins', 'game wins', 'points scored', 'points difference', 'custom'  Help 
	tournament[rr_pts_for_match_win]
	Decimal (to the nearest tenth) - Round Robin "custom only" - default: 1.0
	tournament[rr_pts_for_match_tie]
	Decimal (to the nearest tenth) - Round Robin "custom" only - default: 0.5
	tournament[rr_pts_for_game_win]
	Decimal (to the nearest tenth) - Round Robin "custom" only - default: 0.0
	tournament[rr_pts_for_game_tie]
	Decimal (to the nearest tenth) - Round Robin "custom" only - default: 0.0
	tournament[accept_attachments]
	True or false - Allow match attachment uploads (default: false)
	tournament[hide_forum]
	True or false - Hide the forum tab on your Challonge page (default: false)
	tournament[show_rounds]
	True or false - Single &amp; Double Elimination only - Label each round above the bracket (default: false)
	tournament[private]
	True or false - Hide this tournament from the public browsable index and your profile (default: false)
	tournament[notify_users_when_matches_open]
	True or false - Email registered Challonge participants when matches open up for them (default: false)
	tournament[notify_users_when_the_tournament_ends]
	True or false - Email registered Challonge participants the results when this tournament ends (default: false)
	tournament[sequential_pairings]
	True or false - Instead of traditional seeding rules, make pairings by going straight down the list of participants. First round matches are filled in top to bottom, then qualifying matches (if applicable). (default: false)
	tournament[signup_cap]
	Integer - Maximum number of participants in the bracket. A waiting list (attribute on Participant) will capture participants once the cap is reached.
	tournament[start_at]
	Datetime - the planned or anticipated start time for the tournament (Used with check_in_duration to determine participant check-in window). Timezone defaults to Eastern.
	tournament[check_in_duration]
	Integer - Length of the participant check-in window in minutes.
	tournament[grand_finals_modifier]
	String - This option only affects double elimination. null/blank (default) - give the winners bracket finalist two chances to beat the losers bracket finalist, 'single match' - create only one grand finals match, 'skip' - don't create a finals match between winners and losers bracket finalists


	

Get a tournament (show)
Retrieve a single tournament record created with your account.
________________


URL
GET https://api.challonge.com/v1/tournaments/{tournament}.{json|xml}
________________
Parameters
Name
	Description
	Required
api_key
	Your API key (required unless you're using HTTP basic authentication)
	Required
{tournament} (in URL string)
	Tournament ID (e.g. 10230) or URL (e.g. 'single_elim' for challonge.com/single_elim). If assigned to a subdomain, URL format must be :subdomain-:tournament_url (e.g. 'test-mytourney' for test.challonge.com/mytourney)
	include_participants
	0 or 1; includes an array of associated participant records
	include_matches
	0 or 1; includes an array of associated match records


	

Update a tournament
Update a tournament's attributes.
________________


URL
PUT  Help  https://api.challonge.com/v1/tournaments/{tournament}.{json|xml}
________________
Parameters
Name
	Description
	Required
api_key
	Your API key (required unless you're using HTTP basic authentication)
	Required
{tournament} (in URL string)
	Tournament ID (e.g. 10230) or URL (e.g. 'single_elim' for challonge.com/single_elim). If assigned to a subdomain, URL format must be :subdomain-:tournament_url (e.g. 'test-mytourney' for test.challonge.com/mytourney)
	tournament[name]
	Your event's name/title (Max: 60 characters)
	tournament[tournament_type]
	Single elimination (default), double elimination, round robin, swiss
	tournament[url]
	challonge.com/url (letters, numbers, and underscores only); when blank on create, a random URL will be generated for you
	tournament[subdomain]
	subdomain.challonge.com/url (Requires write access to the specified subdomain)
	tournament[description]
	Description/instructions to be displayed above the bracket
	tournament[open_signup]
	True or false. Have Challonge host a sign-up page (otherwise, you manually add all participants)
	tournament[hold_third_place_match]
	True or false - Single Elimination only. Include a match between semifinal losers? (default: false)
	tournament[pts_for_match_win]
	Decimal (to the nearest tenth) - Swiss only - default: 1.0
	tournament[pts_for_match_tie]
	Decimal (to the nearest tenth) - Swiss only - default: 0.5
	tournament[pts_for_game_win]
	Decimal (to the nearest tenth) - Swiss only - default: 0.0
	tournament[pts_for_game_tie]
	Decimal (to the nearest tenth) - Swiss only - default: 0.0
	tournament[pts_for_bye]
	Decimal (to the nearest tenth) - Swiss only - default: 1.0
	tournament[swiss_rounds]
	Integer - Swiss only - We recommend limiting the number of rounds to less than two-thirds the number of players. Otherwise, an impossible pairing situation can be reached and your tournament may end before the desired number of rounds are played.
	tournament[ranked_by]
	One of the following: 'match wins', 'game wins', 'points scored', 'points difference', 'custom'  Help 
	tournament[rr_pts_for_match_win]
	Decimal (to the nearest tenth) - Round Robin "custom only" - default: 1.0
	tournament[rr_pts_for_match_tie]
	Decimal (to the nearest tenth) - Round Robin "custom" only - default: 0.5
	tournament[rr_pts_for_game_win]
	Decimal (to the nearest tenth) - Round Robin "custom" only - default: 0.0
	tournament[rr_pts_for_game_tie]
	Decimal (to the nearest tenth) - Round Robin "custom" only - default: 0.0
	tournament[accept_attachments]
	True or false - Allow match attachment uploads (default: false)
	tournament[hide_forum]
	True or false - Hide the forum tab on your Challonge page (default: false)
	tournament[show_rounds]
	True or false - Single &amp; Double Elimination only - Label each round above the bracket (default: false)
	tournament[private]
	True or false - Hide this tournament from the public browsable index and your profile (default: false)
	tournament[notify_users_when_matches_open]
	True or false - Email registered Challonge participants when matches open up for them (default: false)
	tournament[notify_users_when_the_tournament_ends]
	True or false - Email registered Challonge participants the results when this tournament ends (default: false)
	tournament[sequential_pairings]
	True or false - Instead of traditional seeding rules, make pairings by going straight down the list of participants. First round matches are filled in top to bottom, then qualifying matches (if applicable). (default: false)
	tournament[signup_cap]
	Integer - Maximum number of participants in the bracket. A waiting list (attribute on Participant) will capture participants once the cap is reached.
	tournament[start_at]
	Datetime - the planned or anticipated start time for the tournament (Used with check_in_duration to determine participant check-in window). Timezone defaults to Eastern.
	tournament[check_in_duration]
	Integer - Length of the participant check-in window in minutes.
	tournament[grand_finals_modifier]
	String - This option only affects double elimination. null/blank (default) - give the winners bracket finalist two chances to beat the losers bracket finalist, 'single match' - create only one grand finals match, 'skip' - don't create a finals match between winners and losers bracket finalists
	

Delete a tournament
Deletes a tournament along with all its associated records. There is no undo, so use with care!
________________


URL
DELETE  Help  https://api.challonge.com/v1/tournaments/{tournament}.{json|xml}
________________
Parameters
Name
	Description
	Required
api_key
	Your API key (required unless you're using HTTP basic authentication)
	Required
{tournament} (in URL string)
	Tournament ID (e.g. 10230) or URL (e.g. 'single_elim' for challonge.com/single_elim). If assigned to a subdomain, URL format must be :subdomain-:tournament_url (e.g. 'test-mytourney' for test.challonge.com/mytourney)
	Process check-in results for a tournament
This should be invoked after a tournament's check-in window closes before the tournament is started.
1. Marks participants who have not checked in as inactive.
2. Moves inactive participants to bottom seeds (ordered by original seed).
3. Transitions the tournament state from 'checking_in' to 'checked_in'
NOTE: Checked in participants on the waiting list will be promoted if slots become available.
________________


URL
POST https://api.challonge.com/v1/tournaments/{tournament}/process_check_ins.{json|xml}
________________
Parameters
Name
	Description
	Required
api_key
	Your API key (required unless you're using HTTP basic authentication)
	Required
{tournament} (in URL string)
	Tournament ID (e.g. 10230) or URL (e.g. 'single_elim' for challonge.com/single_elim). If assigned to a subdomain, URL format must be :subdomain-:tournament_url (e.g. 'test-mytourney' for test.challonge.com/mytourney)
	include_participants
	0 or 1; includes an array of associated participant records
	include_matches
	0 or 1; includes an array of associated match records
	Abort check-in for a tournament
When your tournament is in a 'checking_in' or 'checked_in' state, there's no way to edit the tournament's start time (start_at) or check-in duration (check_in_duration). You must first abort check-in, then you may edit those attributes.
1. Makes all participants active and clears their checked_in_at times.
2. Transitions the tournament state from 'checking_in' or 'checked_in' to 'pending'
________________


URL
POST https://api.challonge.com/v1/tournaments/{tournament}/abort_check_in.{json|xml}
________________
Parameters
Name
	Description
	Required
api_key
	Your API key (required unless you're using HTTP basic authentication)
	Required
{tournament} (in URL string)
	Tournament ID (e.g. 10230) or URL (e.g. 'single_elim' for challonge.com/single_elim). If assigned to a subdomain, URL format must be :subdomain-:tournament_url (e.g. 'test-mytourney' for test.challonge.com/mytourney)
	include_participants
	0 or 1; includes an array of associated participant records
	include_matches
	0 or 1; includes an array of associated match records
	Start a tournament
Start a tournament, opening up first round matches for score reporting. The tournament must have at least 2 participants.
________________


URL
POST https://api.challonge.com/v1/tournaments/{tournament}/start.{json|xml}
________________
Parameters
Name
	Description
	Required
api_key
	Your API key (required unless you're using HTTP basic authentication)
	Required
{tournament} (in URL string)
	Tournament ID (e.g. 10230) or URL (e.g. 'single_elim' for challonge.com/single_elim). If assigned to a subdomain, URL format must be :subdomain-:tournament_url (e.g. 'test-mytourney' for test.challonge.com/mytourney)
	include_participants
	0 or 1; includes an array of associated participant records
	include_matches
	0 or 1; includes an array of associated match records
	Finalize a tournament
Finalize a tournament that has had all match scores submitted, rendering its results permanent.
________________


URL
POST https://api.challonge.com/v1/tournaments/{tournament}/finalize.{json|xml}
________________
Parameters
Name
	Description
	Required
api_key
	Your API key (required unless you're using HTTP basic authentication)
	Required
{tournament} (in URL string)
	Tournament ID (e.g. 10230) or URL (e.g. 'single_elim' for challonge.com/single_elim). If assigned to a subdomain, URL format must be :subdomain-:tournament_url (e.g. 'test-mytourney' for test.challonge.com/mytourney)
	include_participants
	0 or 1; includes an array of associated participant records
	include_matches
	0 or 1; includes an array of associated match records


	Reset a tournament
Reset a tournament, clearing all of its scores and attachments. You can then add/remove/edit participants before starting the tournament again.
________________


URL
POST https://api.challonge.com/v1/tournaments/{tournament}/reset.{json|xml}
________________
Parameters
Name
	Description
	Required
api_key
	Your API key (required unless you're using HTTP basic authentication)
	Required
{tournament} (in URL string)
	Tournament ID (e.g. 10230) or URL (e.g. 'single_elim' for challonge.com/single_elim). If assigned to a subdomain, URL format must be :subdomain-:tournament_url (e.g. 'test-mytourney' for test.challonge.com/mytourney)
	include_participants
	0 or 1; includes an array of associated participant records
	include_matches
	0 or 1; includes an array of associated match records
	Open the tournament for predictions
Sets the state of the tournament to start accepting predictions. Your tournament's 'prediction_method' attribute must be set to 1 (exponential scoring) or 2 (linear scoring) to use this option. Note: Once open for predictions, match records will be persisted, so participant additions and removals will no longer be permitted.
________________


URL
POST https://api.challonge.com/v1/tournaments/{tournament}/open_for_predictions.{json|xml}
________________
Parameters
Name
	Description
	Required
api_key
	Your API key (required unless you're using HTTP basic authentication)
	Required
{tournament} (in URL string)
	Tournament ID (e.g. 10230) or URL (e.g. 'single_elim' for challonge.com/single_elim). If assigned to a subdomain, URL format must be :subdomain-:tournament_url (e.g. 'test-mytourney' for test.challonge.com/mytourney)
	include_participants
	0 or 1; includes an array of associated participant records
	include_matches
	0 or 1; includes an array of associated match records
	PArticipant API Calls
List a tournament's participants (index)
Retrieve a tournament's participant list.
________________


URL
GET https://api.challonge.com/v1/tournaments/{tournament}/participants.{json|xml}
________________
Parameters
Name
	Description
	Required
api_key
	Your API key (required unless you're using HTTP basic authentication)
	Required
{tournament} (in URL string)
	Tournament ID (e.g. 10230) or URL (e.g. 'single_elim' for challonge.com/single_elim). If assigned to a subdomain, URL format must be :subdomain-:tournament_url (e.g. 'test-mytourney' for test.challonge.com/mytourney)


	Create a participant
Add a participant to a tournament (up until it is started).
________________


URL
POST https://api.challonge.com/v1/tournaments/{tournament}/participants.{json|xml}
________________
Parameters
Name
	Description
	Required
api_key
	Your API key (required unless you're using HTTP basic authentication)
	Required
{tournament} (in URL string)
	Tournament ID (e.g. 10230) or URL (e.g. 'single_elim' for challonge.com/single_elim). If assigned to a subdomain, URL format must be :subdomain-:tournament_url (e.g. 'test-mytourney' for test.challonge.com/mytourney)
	participant[name]
	The name displayed in the bracket/schedule - not required if email or challonge_username is provided. Must be unique per tournament.
	participant[challonge_username]
	Provide this if the participant has a Challonge account. He or she will be invited to the tournament.
	participant[email]
	Providing this will first search for a matching Challonge account. If one is found, this will have the same effect as the "challonge_username" attribute. If one is not found, the "new-user-email" attribute will be set, and the user will be invited via email to create an account.
	participant[seed]
	integer - The participant's new seed. Must be between 1 and the current number of participants (including the new record). Overwriting an existing seed will automatically bump other participants as you would expect.
	participant[misc]
	string - Max: 255 characters. Multi-purpose field that is only visible via the API and handy for site integration (e.g. key to your users table)
	Bulk create participants
Bulk add participants to a tournament (up until it is started). If an invalid participant is detected, bulk participant creation will halt and any previously added participants (from this API request) will be rolled back.
________________


URL
POST https://api.challonge.com/v1/tournaments/{tournament}/participants/bulk_add.{json|xml}
________________
Parameters
Name
	Description
	Required
api_key
	Your API key (required unless you're using HTTP basic authentication)
	Required
{tournament} (in URL string)
	Tournament ID (e.g. 10230) or URL (e.g. 'single_elim' for challonge.com/single_elim). If assigned to a subdomain, URL format must be :subdomain-:tournament_url (e.g. 'test-mytourney' for test.challonge.com/mytourney)
	participants[][name]
	The name displayed in the bracket/schedule - not required if email or challonge_username is provided. Must be unique per tournament.
	participants[][invite_name_or_email]
	Username can be provided if the participant has a Challonge account. Providing email will first search for a matching Challonge account. If one is found, the user will be invited. If not, the "new-user-email" attribute will be set, and the user will be invited via email to create an account.
	participants[][seed]
	integer - The participant's new seed. Must be between 1 and the current number of participants (including the new record). Overwriting an existing seed will automatically bump other participants as you would expect.
	participants[][misc]
	string - Max: 255 characters. Multi-purpose field that is only visible via the API and handy for site integration (e.g. key to your users table)
	Get a participant (show)
Retrieve a single participant record for a tournament.
________________


URL
GET https://api.challonge.com/v1/tournaments/{tournament}/participants/{participant_id}.{json|xml}
________________
Parameters
Name
	Description
	Required
api_key
	Your API key (required unless you're using HTTP basic authentication)
	Required
{tournament} (in URL string)
	Tournament ID (e.g. 10230) or URL (e.g. 'single_elim' for challonge.com/single_elim). If assigned to a subdomain, URL format must be :subdomain-:tournament_url (e.g. 'test-mytourney' for test.challonge.com/mytourney)
	Required
{participant_id} (in URL string)
	The participant's unique ID
	include_matches
	0 or 1; includes an array of associated match records
	Update a participant
Update the attributes of a tournament participant.
________________


URL
PUT  Help  https://api.challonge.com/v1/tournaments/{tournament}/participants/{participant_id}.{json|xml}
________________
Parameters
Name
	Description
	Required
api_key
	Your API key (required unless you're using HTTP basic authentication)
	Required
{tournament} (in URL string)
	Tournament ID (e.g. 10230) or URL (e.g. 'single_elim' for challonge.com/single_elim). If assigned to a subdomain, URL format must be :subdomain-:tournament_url (e.g. 'test-mytourney' for test.challonge.com/mytourney)
	Required
{participant_id} (in URL string)
	The participant's unique ID
	participant[name]
	The name displayed in the bracket/schedule - not required if email or challonge_username is provided. Must be unique per tournament.
	participant[challonge_username]
	Provide this if the participant has a Challonge account. He or she will be invited to the tournament.
	participant[email]
	Providing this will first search for a matching Challonge account. If one is found, this will have the same effect as the "challonge_username" attribute. If one is not found, the "new-user-email" attribute will be set, and the user will be invited via email to create an account.
	participant[seed]
	integer - The participant's new seed. Must be between 1 and the current number of participants (including the new record). Overwriting an existing seed will automatically bump other participants as you would expect.
	participant[misc]
	string - Max: 255 characters. Multi-purpose field that is only visible via the API and handy for site integration (e.g. key to your users table)
	Check in a participant
Checks a participant in, setting checked_in_at to the current time.
________________


URL
POST https://api.challonge.com/v1/tournaments/{tournament}/participants/{participant_id}/check_in.{json|xml}
________________
Parameters
Name
	Description
	Required
api_key
	Your API key (required unless you're using HTTP basic authentication)
	Required
{tournament} (in URL string)
	Tournament ID (e.g. 10230) or URL (e.g. 'single_elim' for challonge.com/single_elim). If assigned to a subdomain, URL format must be :subdomain-:tournament_url (e.g. 'test-mytourney' for test.challonge.com/mytourney)
	Required
{participant_id} (in URL string)
	The participant's unique ID
	Undo check-in for a participant
Marks a participant as having not checked in, setting checked_in_at to nil.
________________


URL
POST https://api.challonge.com/v1/tournaments/{tournament}/participants/{participant_id}/undo_check_in.{json|xml}
________________
Parameters
Name
	Description
	Required
api_key
	Your API key (required unless you're using HTTP basic authentication)
	Required
{tournament} (in URL string)
	Tournament ID (e.g. 10230) or URL (e.g. 'single_elim' for challonge.com/single_elim). If assigned to a subdomain, URL format must be :subdomain-:tournament_url (e.g. 'test-mytourney' for test.challonge.com/mytourney)
	Required
{participant_id} (in URL string)
	The participant's un
	Delete/deactivate a participant
If the tournament has not started, delete a participant, automatically filling in the abandoned seed number. If tournament is underway, mark a participant inactive, automatically forfeiting his/her remaining matches.
________________


URL
DELETE  Help  https://api.challonge.com/v1/tournaments/{tournament}/participants/{participant_id}.{json|xml}
________________
Parameters
Name
	Description
	Required
api_key
	Your API key (required unless you're using HTTP basic authentication)
	Required
{tournament} (in URL string)
	Tournament ID (e.g. 10230) or URL (e.g. 'single_elim' for challonge.com/single_elim). If assigned to a subdomain, URL format must be :subdomain-:tournament_url (e.g. 'test-mytourney' for test.challonge.com/mytourney)
	Required
{participant_id} (in URL string)
	The participant'
	Clear/delete all participants
Deletes all participants in a tournament. (Only allowed if tournament hasn't started yet)
________________


URL
DELETE  Help  https://api.challonge.com/v1/tournaments/{tournament}/participants/clear.{json|xml}
________________
Parameters
Name
	Description
	Required
api_key
	Your API key (required unless you're using HTTP basic authentication)
	Required
{tournament} (in URL string)
	Tournament ID (e.g. 10230) or URL (e.g. 'single_elim' for challonge.com/single_elim). If assigned to a subdomain, URL format must be :subdomain-:tournament_url (e.g. 'test-mytourney' for test.challonge.com/mytourney)
	Randomize a tournament's participants
Randomize seeds among participants. Only applicable before a tournament has started.
________________


URL
POST https://api.challonge.com/v1/tournaments/{tournament}/participants/randomize.{json|xml}
________________
Parameters
Name
	Description
	Required
api_key
	Your API key (required unless you're using HTTP basic authentication)
	Required
{tournament} (in URL string)
	Tournament ID (e.g. 10230) or URL (e.g. 'single_elim' for challonge.com/single_elim). If assigned to a subdomain, URL format must be :subdomain-:tournament_url (e.g. 'test-mytourney' for test.challonge.com/mytourney)
	

Match API Calls
List a tournament's matches (index)
Retrieve a tournament's match list.
________________


URL
GET https://api.challonge.com/v1/tournaments/{tournament}/matches.{json|xml}
________________
Parameters
Name
	Description
	Required
api_key
	Your API key (required unless you're using HTTP basic authentication)
	Required
{tournament} (in URL string)
	Tournament ID (e.g. 10230) or URL (e.g. 'single_elim' for challonge.com/single_elim). If assigned to a subdomain, URL format must be :subdomain-:tournament_url (e.g. 'test-mytourney' for test.challonge.com/mytourney)
	state
	all (default), pending, open, complete
	participant_id
	Only retrieve matches that include the specified participant.


	Get a match (show)
Retrieve a single match record for a tournament.
________________


URL
GET https://api.challonge.com/v1/tournaments/{tournament}/matches/{match_id}.{json|xml}
________________
Parameters
Name
	Description
	Required
api_key
	Your API key (required unless you're using HTTP basic authentication)
	Required
{tournament} (in URL string)
	Tournament ID (e.g. 10230) or URL (e.g. 'single_elim' for challonge.com/single_elim). If assigned to a subdomain, URL format must be :subdomain-:tournament_url (e.g. 'test-mytourney' for test.challonge.com/mytourney)
	Required
{match_id} (in URL string)
	The match's unique ID
	include_attachments
	0 or 1; include an array of associated attachment records
	Update a match
Update/submit the score(s) for a match.
________________


URL
PUT  Help  https://api.challonge.com/v1/tournaments/{tournament}/matches/{match_id}.{json|xml}
________________
Parameters
Name
	Description
	Required
api_key
	Your API key (required unless you're using HTTP basic authentication)
	Required
{tournament} (in URL string)
	Tournament ID (e.g. 10230) or URL (e.g. 'single_elim' for challonge.com/single_elim). If assigned to a subdomain, URL format must be :subdomain-:tournament_url (e.g. 'test-mytourney' for test.challonge.com/mytourney)
	Required
{match_id} (in URL string)
	The match's unique ID
	match[scores_csv]
	Comma separated set/game scores with player 1 score first (e.g. "1-3,3-0,3-2")
	match[winner_id]
	The participant ID of the winner or "tie" if applicable (Round Robin and Swiss). NOTE: If you change the outcome of a completed match, all matches in the bracket that branch from the updated match will be reset.
	match[player1_votes]
	Overwrites the number of votes for player 1
	match[player2_votes]
	Overwrites the number of votes for player 2
	

* If you're updating winner_id, scores_csv must also be provided. You may, however, update score_csv without providing winner_id for live score updates.
	Reopen a match
Reopens a match that was marked completed, automatically resetting matches that follow it
________________


URL
POST https://api.challonge.com/v1/tournaments/{tournament}/matches/{match_id}/reopen.{json|xml}
________________
Parameters
Name
	Description
	Required
api_key
	Your API key (required unless you're using HTTP basic authentication)
	Required
{tournament} (in URL string)
	Tournament ID (e.g. 10230) or URL (e.g. 'single_elim' for challonge.com/single_elim). If assigned to a subdomain, URL format must be :subdomain-:tournament_url (e.g. 'test-mytourney' for test.challonge.com/mytourney)
	Required
{match_id} (in URL string)
	The match's unique ID
	Mark a match as underway
Sets "underway_at" to the current time and highlights the match in the bracket
________________


URL
POST https://api.challonge.com/v1/tournaments/{tournament}/matches/{match_id}/mark_as_underway.{json|xml}
________________
Parameters
Name
	Description
	Required
api_key
	Your API key (required unless you're using HTTP basic authentication)
	Required
{tournament} (in URL string)
	Tournament ID (e.g. 10230) or URL (e.g. 'single_elim' for challonge.com/single_elim). If assigned to a subdomain, URL format must be :subdomain-:tournament_url (e.g. 'test-mytourney' for test.challonge.com/mytourney)
	Required
{match_id} (in URL string)
	The match's unique ID


	Unmark a match as underway
Clears "underway_at" and unhighlights the match in the bracket
________________


URL
POST https://api.challonge.com/v1/tournaments/{tournament}/matches/{match_id}/unmark_as_underway.{json|xml}
________________
Parameters
Name
	Description
	Required
api_key
	Your API key (required unless you're using HTTP basic authentication)
	Required
{tournament} (in URL string)
	Tournament ID (e.g. 10230) or URL (e.g. 'single_elim' for challonge.com/single_elim). If assigned to a subdomain, URL format must be :subdomain-:tournament_url (e.g. 'test-mytourney' for test.challonge.com/mytourney)
	Required
{match_id} (in URL string)
	The match's unique ID
	

Attachment API Calls
List a match's attachments (index)
Retrieve a match's attachments.
________________


URL
GET https://api.challonge.com/v1/tournaments/{tournament}/matches/{match_id}/attachments.{json|xml}
________________
Parameters
Name
	Description
	Required
api_key
	Your API key (required unless you're using HTTP basic authentication)
	Required
{tournament} (in URL string)
	Tournament ID (e.g. 10230) or URL (e.g. 'single_elim' for challonge.com/single_elim). If assigned to a subdomain, URL format must be :subdomain-:tournament_url (e.g. 'test-mytourney' for test.challonge.com/mytourney)
	Required
{match_id} (in URL string)
	The match's
	Create a match attachment
Add a file, link, or text attachment to a match. NOTE: The associated tournament's "accept_attachments" attribute must be true for this action to succeed.
________________


URL
POST https://api.challonge.com/v1/tournaments/{tournament}/matches/{match_id}/attachments.{json|xml}
________________
Parameters
Name
	Description
	Required
api_key
	Your API key (required unless you're using HTTP basic authentication)
	Required
{tournament} (in URL string)
	Tournament ID (e.g. 10230) or URL (e.g. 'single_elim' for challonge.com/single_elim). If assigned to a subdomain, URL format must be :subdomain-:tournament_url (e.g. 'test-mytourney' for test.challonge.com/mytourney)
	Required
{match_id} (in URL string)
	The match's unique ID
	match_attachment[asset]
	A file upload (250KB max, no more than 4 attachments per match). If provided, the url parameter will be ignored.
	match_attachment[url]
	A web URL
	match_attachment[description]
	Text to describe the file or URL attachment, or this can simply be standalone text.
	

* At least 1 of the 3 optional parameters must be provided.
* Files up to 25MB are allowed for tournaments hosted by  Premier badge  Challonge Premier subscribers.
	Get a match attachment (show)
Retrieve a single match attachment record.
________________


URL
GET https://api.challonge.com/v1/tournaments/{tournament}/matches/{match_id}/attachments/{attachment_id}.{json|xml}
________________
Parameters
Name
	Description
	Required
api_key
	Your API key (required unless you're using HTTP basic authentication)
	Required
{tournament} (in URL string)
	Tournament ID (e.g. 10230) or URL (e.g. 'single_elim' for challonge.com/single_elim). If assigned to a subdomain, URL format must be :subdomain-:tournament_url (e.g. 'test-mytourney' for test.challonge.com/mytourney)
	Required
{match_id} (in URL string)
	The match's unique ID
	Required
{attachment_id} (in URL string)
	The attachment's unique ID
	Update a match attachment
Update the attributes of a match attachment.
________________


URL
PUT  Help  https://api.challonge.com/v1/tournaments/{tournament}/matches/{match_id}/attachments/{attachment_id}.{json|xml}
________________
Parameters
Name
	Description
	Required
api_key
	Your API key (required unless you're using HTTP basic authentication)
	Required
{tournament} (in URL string)
	Tournament ID (e.g. 10230) or URL (e.g. 'single_elim' for challonge.com/single_elim). If assigned to a subdomain, URL format must be :subdomain-:tournament_url (e.g. 'test-mytourney' for test.challonge.com/mytourney)
	Required
{match_id} (in URL string)
	The match's unique ID
	match_attachment[asset]
	A file upload (250KB max, no more than 4 attachments per match). If provided, the url parameter will be ignored.
	match_attachment[url]
	A web URL
	match_attachment[description]
	Text to describe the file or URL attachment, or this can simply be standalone text.
	

* At least 1 of the 3 optional parameters must be provided.
* Files up to 25MB are allowed for tournaments hosted by  Premier badge  Challonge Premier subscribers.
	Delete a match attachment
Delete a match attachment.
________________


URL
DELETE  Help  https://api.challonge.com/v1/tournaments/{tournament}/matches/{match_id}/attachments/{attachment_id}.{json|xml}
________________
Parameters
Name
	Description
	Required
api_key
	Your API key (required unless you're using HTTP basic authentication)
	Required
{tournament} (in URL string)
	Tournament ID (e.g. 10230) or URL (e.g. 'single_elim' for challonge.com/single_elim). If assigned to a subdomain, URL format must be :subdomain-:tournament_url (e.g. 'test-mytourney' for test.challonge.com/mytourney)
	Required
{match_id} (in URL string)
	The match's unique ID
	Required
{attachment_id} (in URL string)
	The attachment's unique ID